<template>
  <el-card class="avue_height">
    <el-page-header @back="$router.go(-1)" style="margin-bottom:10px"></el-page-header>
    <div class="table_caozuo">
      <!--  <template v-for="(item,index) in btn">
      <el-button
        :key="index"
        @click="handler(index)"
        v-if="item.isShow"
        type="primary"
        style="margin:0 0 20px 0"
      >{{item.title}}</el-button>
      </template>-->
      <avue-crud
        ref="crud"
        style="width:100%"
        :data="loadData"
        :option="tableOption"
        :table-loading="loading"
      >
        <template slot="menu" slot-scope="scope">
          <el-button @click="edit(scope.row)" type="text" icon="el-icon-edit">查看明细</el-button>
        </template>
      </avue-crud>
      <template>
        <div style="width:100%;position:relative;height:50px">
          <el-pagination
            :page-sizes="[10, 20,30,40, 50, 100]"
            :pager-count="7"
            :current-page="page.current"
            :page-size="page.size"
            :total="page.total"
            layout="total, sizes, prev, pager, next, jumper"
            style="margin-top:2%;position:absolute;right:1%"
            background
            @size-change="sizeChange"
            @current-change="currentChange"
          ></el-pagination>
        </div>
      </template>
    </div>
  </el-card>
</template>

<script src='./index.js'></script>

<style lang="scss">
.table_caozuo {
  margin: 10px 0px;
}
</style>